package com.hantang.web.json.handlers;

import org.apache.log4j.Logger;
import org.glassfish.grizzly.http.server.Request;
import org.glassfish.grizzly.http.server.Response;

import com.google.gson.Gson;
import com.hantang.web.json.ds.MetaData;
import com.hantang.web.json.res.StringRes;

public class UnkownUrlHandler extends AbstractHandler {

	private Logger logger = Logger.getLogger(UnkownUrlHandler.class);
	
	@Override
	public String doService(Request req, Response resp) throws Exception {
		StringRes sres = new StringRes();
		logger.info("UnkownUrlHandler......");
		sres.setData("UnkownUrl");
		sres.setMeta(new MetaData(MetaData.META_DATA_ERROR_PARA, "Unkown URL"));
		Gson gson = new Gson();
		return gson.toJson(sres);
	}

}
